<?php

config/modules/KdxUrlRuleConfig.php

//修改默认转发路由

parseShopH5Request 方法

    /**
     * 匹配请商家端请求
     * @param Request $request
     * @return array|bool
     * @author likexin
     */
    private function parseShopH5Request(Request $request)
    {
        if (defined('SHOP_STAR_IS_NOTIFY') && SHOP_STAR_IS_NOTIFY) {
            return ['', []];
        }

        if (SHOP_STAR_IS_INSTALLED) {
            if (empty($request->pathInfo)){
                return ['kdx/h5', []]; //修改默认转发
            }
            // 其他情况默认转发商家端index
            return ['kdx/admin', []];
        }
        return false;
    }


    services/commission/CommissionOrderService.php

    分销bug


    // 业绩考核的阶梯佣金
    $commissionOrderData[$index]['origin_ladder_commission'] = bcadd($commissionOrderData[$index]['origin_ladder_commission'], $commission, 2);

    //修改为

    $commissionOrderData[$index]['original_ladder_commission'] = bcadd($commissionOrderData[$index]['original_ladder_commission'], $commission, 2);



    models/shop/ShopSettings.php

    //远端存储bug

    getImageCompressionRule 方法

    public static function getImageCompressionRule()
    {
        $storage = self::get('service_storage');

        // TODO likexin
        $result = [
            'storage_model' => $storage['storage_model'],
            'type' => CoreSettings::get('storage.type'),
        ];

        return $result;
    }

    //改为

    public static function getImageCompressionRule()
    {
        $storage = self::get('service_storage');

        // TODO likexin
        $result = [
//            'storage_model' => $storage['storage_model'],
            'storage_model' => CoreSettings::get('storage.storage_model'),
            'type' => CoreSettings::get('storage.type'),
        ];

        return $result;
    }

    admin\system\StorageController.php

    99行增加 
    if ($type == 'local'){
        $storage_model = 10;
    }else{
        $storage_model = 20;
    }

    172行增加
    $originalSettings['storage_model'] = $storage_model;


    //守护进程 

    /www/server/php/74/bin/php /www/wwwroot/ln.emw.cc/yii queue/listen





    更换后台logo图片

    src/assets/image/alone/store/loginLogo.png

    src/assets/image/alone/store/logo.png


    微信小程序后台注意设置开发域名  域名为https协议


    //公众号关注回复BUG
    components/response/ResponseComponent.php

    $rule = WechatRuleModel::getEvent($config['type'], 'poster', $config['message']['message']['EventKey']);

    改成

    $rule = WechatRuleModel::getEvent($config['type'], 'poster', $config['message']['message']['EventKey'] ?? '');




    昵称问题

    /models/member/MemberModel.php

    public static string $defaultNickNameTips = '点击显示微信头像';

    //改成

    public static string $defaultNickNameTips = '点击显示微信昵称';

    \mobile\member\IndexController.php
    注释
    $result['data']['nickname'] = MemberModel::$defaultNickNameTips;



    \mobile\product\DetailController.php
    actionGetWxappQrcode 方法

    // 下载头像
        if (!is_file($avatar)) {
            try {
                file_put_contents($avatar, file_get_contents($this->member['avatar']));
            }catch (\Exception $e){
            }
        }
    $avatar = ShopUrlHelper::build('/tmp/wxapp_avatar/' . '_' . $this->member['id'] . '.png', [], true);

    uni-app代码
    /src/components/poster/getUrl.js
    getWxGoodPoster 获取小程序商品小程序码
    注释调用uni.getImageInfo 方法  直接返回图片路径 resolve(res.patch)
            api.goodApi.getWxPoster({
                goods_id: id
            }).then(res => {
                if (res.error === 0) {
                    resolve(res.patch)
                    // uni.getImageInfo({
                    //     src: res.patch,
                    //     success: img => {
                    //         qrcode = img.path;
                    //         resolve(img.path)
                    //     },
                    //     fail(err){
                    //         uni.showToast({
                    //             title: '下载商品二维码失败',
                    //             icon: 'none',
                    //         })
                    //         resolve()
                    //     }
                    // })
                } else {
                    uni.showToast({
                        title:'加载商品二维码失败:'+ res.message,
                        icon: 'none',
                    })
                    resolve()
                }
            }).catch(()=>{
                resolve()
                uni.showToast({
                    title: '加载商品二维码失败',
                    icon: 'none',
                })
            });

